﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace The_LarX
{
    public class MenuEntrySA : MenuEntry
    {
        public Sprite2D[] SpriteArray;

        public Color DefaultColor = Color.White;

        public MenuEntrySA(Sprite2D[] sprites, MenuEntryCallback Callback, MenuScreen Screen)
            : base(Screen)
        {
            this.SpriteArray = sprites;
            this.CallBack = Callback;
            this.Sprite = sprites[0];
        }
        public MenuEntrySA(Sprite2D[] sprites, MenuEntryCallback leftCallback, MenuEntryCallback rightCallback, MenuScreen Screen)
            : base(Screen)
        {
            this.SpriteArray = sprites;
            this.CallBack = leftCallback;
            this.RightCallBack = rightCallback;
            this.Sprite = sprites[0];
        }
        public MenuEntrySA(MenuScreen Screen)
            : base(Screen)
        {
        }

        public override void Update()
        {
            for (int i = 0; i < SpriteArray.Length; i++)
            {
                SpriteArray[i].Update();
            }
        }
        public override void Draw()
        {
            for (int i = 0; i < SpriteArray.Length; i++)
            {
                if (Selected)
                {
                    SpriteArray[i].Color = Color.Yellow;
                }
                else
                {
                    SpriteArray[i].Color = DefaultColor;
                }

                SpriteArray[i].Draw();
            }
        }
    }
}
